package com.elitesland.b2c.tms.convert;

import com.elitesland.b2c.tms.dto.TmsFareTmplDTO;
import com.elitesland.b2c.tms.entity.TmsFareTmplDO;
import com.elitesland.b2c.tms.vo.resp.TmsFareTmplDetailRespVO;
import com.elitesland.b2c.tms.vo.resp.TmsFareTmplPageRespVO;
import com.elitesland.b2c.tms.vo.save.TmsFareTmplSaveVO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * <p>
 * 功能说明
 * </p>
 *
 * @author fred
 * @since 2021-02-03 19:16:13
 */
@Mapper
public interface TmsFareTmplConvert {

    TmsFareTmplConvert INSTANCE = Mappers.getMapper(TmsFareTmplConvert.class);

    /**
     * 保存参数转DO
     *
     * @param saveVO 保存参数数据
     * @return DO
     */
    TmsFareTmplDO saveVo2Do(TmsFareTmplSaveVO saveVO);

    /**
     * 复制saveVO至DO
     *
     * @param saveVo 保存参数数据
     * @param target 原DO数据
     */
    void saveVo2Do(TmsFareTmplSaveVO saveVo, @MappingTarget TmsFareTmplDO target);

    /**
     * do转VO
     *
     * @param doo do数据
     * @return vo数据
     */
    TmsFareTmplDetailRespVO do2DetailRespVo(TmsFareTmplDO doo);

    /**
     * DO转VO
     *
     * @param doList do列表
     * @return VO列表
     */
    List<TmsFareTmplPageRespVO> do2PageRespVOList(List<TmsFareTmplDO> doList);

    /**
     * do 转 DTO
     *
     * @param doo do数据
     * @return DTO
     */
    TmsFareTmplDTO do2DTO(TmsFareTmplDO doo);
}